//20
#include"bits/stdc++.h"
using namespace std;
int k,n=1,sn;
int main()
{
	cin>>k;
	while(sn<=k)
	{
		sn+=n/1;
		n+=1;
	}
	cout<<n-1;
}
